<fieldset>
    <legend>条件搜索</legend>
    <form class="layui-form layui-form-pane form-search" id="formSearch" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
        <!--<div class="layui-form-item layui-inline">
            <label class="layui-form-label">下单时间</label>
            <div class="layui-input-inline">
                <input data-date-range name="create_at" value="{$Think.get.create_at|default=''}" placeholder="请选择下单时间" class="layui-input">
            </div>
        </div>-->
        <div class="layui-form-item layui-inline" >
            <label class="layui-form-label">下单时间</label>
            <div class="layui-input-inline">
                <input data-date-range name="pay_at" value="{$Think.get.pay_at|default=$start_time}" placeholder="请选择支付时间" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">订单单号</label>
            <div class="layui-input-inline">
                <input name="order_no" value="{$Think.get.order_no|default=''}" placeholder="请输入订单单号" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">付款状态</label>
            <div class="layui-input-inline">
                <select class="layui-select" name="pay_state" >
                    {foreach [''=>'- 全部订单 -','2'=>'未支付的订单','1'=>'已支付的订单'] as $k=>$v}
                    <!--{eq name='Think.get.pay_state' value='$k.""'}-->
                    <option selected value="{$k}">{$v}</option>
                    <!--{else}-->
                    <option value="{$k}">{$v}</option>
                    <!--{/eq}-->
                    {/foreach}
                </select>
            </div>
        </div>
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">渠道类型</label>
            <div class="layui-input-inline">
                <select class="layui-select" name="channel_type">
                    <option selected value="">- 全部类型 -</option>
                    {foreach $channel_arr as $k=>$v}
                    <!--{eq name='Think.get.channel_type' value='$v.channel_id .""'}-->
                    <option selected value="{$v.channel_id}">{$v.name}</option>
                    <!--{else}-->
                    <option value="{$v.channel_id}">{$v.name}</option>
                    <!--{/eq}-->
                    {/foreach}
                </select>
            </div>
        </div>
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">计费点类型</label>
            <div class="layui-input-inline">
                <select class="layui-select" name="billing_type" >
                    <option selected value="">- 全部类型 -</option>
                    {foreach $Billing_arr as $k=>$v}
                    <!--{eq name='Think.get.billing_type' value='$v.ID .""'}-->
                    <option selected value="{$v.ID}">{$v.Title}</option>
                    <!--{else}-->
                    <option value="{$v.ID}">{$v.Title}</option>
                    <!--{/eq}-->
                    {/foreach}
                </select>
            </div>
        </div>
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">支付类型</label>
            <div class="layui-input-inline">
                <select class="layui-select" name="pay_type" >
                    <option selected value="">- 全部类型 -</option>
                    {foreach $pay_arr as $k=>$v}
                    <!--{eq name='Think.get.pay_type' value='$v.tradetype .""'}-->
                    <option selected value="{$v.tradetype}">{$v.name}</option>
                    <!--{else}-->
                    <option value="{$v.tradetype}">{$v.name}</option>
                    <!--{/eq}-->
                    {/foreach}
                </select>
            </div>
        </div>
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">玩家id</label>
            <div class="layui-input-inline">
                <input name="UserID" value="{$Think.get.UserID|default=''}" placeholder="请输入玩家id" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item layui-inline">
            <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
            <button type="button" data-reload class="layui-btn layui-btn-xs">刷 新</button>
            <button type="button" id="xiazai" class="layui-btn layui-btn-xs" >Excel导出</button>
        </div>
    </form>
    <script>
        window.form.render();
        $('[data-export-list]').on('click', function () {
            window.location.href = '{:url("@")}?s=store/order/index&' + $(this).parents('form').serialize() + '&action=export'
        });
    </script>
</fieldset>
<script type="text/javascript">
    layui.use(['table','layer'], function() {
        var $ = layui.jquery;
        $('#xiazai').click(function(){
            var data =$('#formSearch').serialize();
            window.location.href = "{:url('Excelexport/user_down_recharge')}?"+data;
        })
    });
</script>